package com.pingba.entity;

/**
 * Created by Administrator on 2015/11/5 0005.
 */
public class Page extends BaseEntity {
    private static int DEFAULT_PAGE_SIZE = 20;
    private long totalRecords;
    private int curPage;
    private int totalPages;
    private int pageSize = DEFAULT_PAGE_SIZE;
    private int start;
    private int end;

    public int getEnd() {
        return (curPage +1)* pageSize;
    }

    public int getStart() {
        return curPage * pageSize;
    }

    public int getCurPage() {
        return curPage;
    }

    public void setCurPage(int curPage) {
        this.curPage = curPage;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getTotalPages() {
        return totalPages;
    }

    public void setTotalPages(int totalPages) {
        this.totalPages = totalPages;
    }

    public long getTotalRecords() {
        return totalRecords;
    }

    public void setTotalRecords(long totalRecords) {
        this.totalRecords = totalRecords;
    }
}
